#ifndef __SCENE_EDITOR_FRAME_H__
#define __SCENE_EDITOR_FRAME_H__


#include "EditorWindow.h"

class SceneEditorDoc;

namespace Ui {
class SceneEditorFrame;
}

class SceneEditorFrame : public EditorWindow
{
    Q_OBJECT
    Q_DISABLE_COPY(SceneEditorFrame)

signals:
    void closeEditor(EditorWindow *);

public:
    SceneEditorFrame(uint pluginID, const QString &filePath, QWidget *parent = 0, Qt::WindowFlags flags = 0);
    virtual ~SceneEditorFrame();

protected:  // from EditorWindow
    QString name() const;
    uint getID() const;
    uint getPluginID() const;
    QMenu *getMenu();
    bool save();

protected:  // event
    void closeEvent(QCloseEvent *event);

protected:
    void initMenu();
    void initToolBar();
    void initActions();
    void initDocument(const QString &filePath);
    void initDockWidget();
    void initView();

    void updateTitle(bool modifiedFlag);

public slots:
    void onDocumentModified();
    void onDocumentSaved();
    void onDocumentOpened();

    void onActAddImage();
    void onActDelImage();

protected:
    uint            mPluginID;
    SceneEditorDoc  *mDoc;

    QMenu           *mMenu;
    QToolBar        *mToolBar;

private:
    Ui::SceneEditorFrame *ui;
};


#endif  /*__SCENE_EDITOR_FRAME_H__*/
